package com.fastjars.business.spring.http;

/**
 * RespStatus
 *
 * @author Brant Liu <br> 邮箱：<br>lbf1988@qq.com <br>日期：<br>2018/05/08
 * @version 1.0.0
 */
public enum RespStatus{
    /**
     * {@code 200 OK}.
     * @see <a href="http://tools.ietf.org/html/rfc7231#section-6.3.1">HTTP/1.1: Semantics and Content, section 6.3.1</a>
     * @see org.springframework.http.HttpStatus#OK
     */
    OK(200, "Success"),
    /**
     * {@code 400 Bad Request}.
     * @see <a href="http://tools.ietf.org/html/rfc7231#section-6.5.1">HTTP/1.1: Semantics and Content, section 6.5.1</a>
     * @see org.springframework.http.HttpStatus#BAD_REQUEST
     */
    BAD_REQUEST(400, "Bad Request"),
    /**
     * 没有权限
     * {@code 401 Unauthorized}.
     * @see <a href="http://tools.ietf.org/html/rfc7235#section-3.1">HTTP/1.1: Authentication, section 3.1</a>
     * @see org.springframework.http.HttpStatus#UNAUTHORIZED
     */
    UNAUTHORIZED(401, "Unauthorized"),
    /**
     * 系统内部错误
     * {@code 500 Internal Server Error}.
     * @see <a href="http://tools.ietf.org/html/rfc7231#section-6.6.1">HTTP/1.1: Semantics and Content, section 6.6.1</a>
     * @see org.springframework.http.HttpStatus#INTERNAL_SERVER_ERROR
     */
    INTERNAL_SERVER_ERROR(500, "Internal Server Error"),
    /**
     * ==========
     * 成功请求 200 + 1没有登录 + 异常代码
     * ==========
     * */
    /**
     * 没有登录
     */
    NOT_LOGIN(2001,"\u6ca1\u6709\u767b\u5f55"),
    /**
     * 账户被锁定
     */
    LOCKED(20010,"\u8d26\u6237\u88ab\u9501\u5b9a"),
    /**
     * 您已经被强制下线，请重新登录
     */
    KICK_OUT_LOGIN(20011,"\u60a8\u5df2\u7ecf\u88ab\u5f3a\u5236\u4e0b\u7ebf\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55"),
    /**
     * 您已经在其他地方登录，请重新登录
     */
    OTHER_LOGIN(20012,"\u60a8\u5df2\u7ecf\u5728\u5176\u4ed6\u5730\u65b9\u767b\u5f55\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55"),
    /**
     * 账号不存在
     */
    ACCOUNT_NOT_FOUND(20013,"\u8d26\u53f7\u4e0d\u5b58\u5728"),
    /**
     * 账号未激活
     */
    ACCOUNT_NOT_ACTIVE(20014,"\u8d26\u53f7\u672a\u6fc0\u6d3b"),
    /**
     * 账号被禁用
     */
    ACCOUNT_DISABLED(20015,"\u8d26\u53f7\u88ab\u7981\u7528"),
    /**
     * 手机号码被锁定
     */
    ACCOUNT_MOBILE_LOCKED(20016,"\u624b\u673a\u53f7\u7801\u88ab\u9501\u5b9a"),
    /**
     * 手机号码未激活
     */
    ACCOUNT_MOBILE_NOT_ACTIVE(20017,"\u624b\u673a\u53f7\u7801\u672a\u6fc0\u6d3b"),
    /**
     * 手机号码被禁止登录
     */
    ACCOUNT_MOBILE_FORBIDDEN(20018,"\u624b\u673a\u53f7\u7801\u88ab\u7981\u6b62\u767b\u5f55"),
    /**
     * 邮箱被锁定
     */
    ACCOUNT_EMAIL_LOCKED(20019,"\u90ae\u7bb1\u88ab\u9501\u5b9a"),
    /**
     * 邮箱未激活
     */
    ACCOUNT_EMAIL_NOT_ACTIVE(20020,"\u90ae\u7bb1\u672a\u6fc0\u6d3b"),
    /**
     * 邮箱被禁止登录
     */
    ACCOUNT_EMAIL_FORBIDDEN(20021,"\u90ae\u7bb1\u88ab\u7981\u6b62\u767b\u5f55"),
    /**
     * 登录密码有误
     */
    ACCOUNT_PASS_ERROR(20022,"\u767b\u5f55\u5bc6\u7801\u6709\u8bef"),
    /**
     * 密码输入错误次数过于频繁,请过10分钟后稍后再试
     */
    ACCOUNT_PASS_EXCESSIVE(20023,"\u5bc6\u7801\u8f93\u5165\u9519\u8bef\u6b21\u6570\u8fc7\u4e8e\u9891\u7e41\u002c\u8bf7\u8fc7\u0031\u0030\u5206\u949f\u540e\u7a0d\u540e\u518d\u8bd5"),

    /**
     * 账号未知异常
     */
    ACCOUNT_EXCEPTION(20030,"\u8d26\u53f7\u672a\u77e5\u5f02\u5e38"),

    /**
     * 参数有误
     */
    PARAMETER_ERROR(2002,"\u53c2\u6570\u6709\u8bef"),
    /**
     * 业务异常
     */
    BUSINESS_ERROR(2003,"\u4e1a\u52a1\u5f02\u5e38");

    private final int value;

    private final String reasonPhrase;

    RespStatus(int value, String reasonPhrase) {
        this.value = value;
        this.reasonPhrase = reasonPhrase;
    }

    public int getValue() {
        return value;
    }

    public String getReasonPhrase() {
        return reasonPhrase;
    }
}
